package com.atguigu.yygh.hosp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @Author 孔德成
 * @Slogan 致敬大师，致敬未来的你
 * @date 2021/8/27
 */
@SpringBootApplication
// 扫描其他模块的组件（配置类 Swagger2Config...）
@ComponentScan(basePackages = {"com.atguigu"})
// 启用AspectJ注解的自动代理
@EnableAspectJAutoProxy
// 启用服务发现，将服务注册到nacos中
@EnableDiscoveryClient
// 发现 feign 服务客户端，扫描 @FeignClient 注解标注的接口
@EnableFeignClients(basePackages = "com.atguigu")
public class ServiceHospApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceHospApplication.class, args);
    }
}
